import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class PitchTest
{

	@Before
	public void setUp() throws Exception
	{
	}
	
	@Test
	public void testFrequencies()
	{
		// A440 and octaves
		assertEquals(220,Pitch.Frequency.A3.frequency(),1e-2);
		assertEquals(440,Pitch.Frequency.A4.frequency(),1e-2);
		assertEquals(880,Pitch.Frequency.A5.frequency(),1e-2);
		
		// Middle C
		assertEquals(261.63,Pitch.Frequency.C4.frequency(),1e-2);
		
		// edges
		assertEquals(27.5,Pitch.Frequency.A0.frequency(),1e-2);
		assertEquals(29.14,Pitch.Frequency.Bb0.frequency(),1e-2);
		assertEquals(30.87,Pitch.Frequency.B0.frequency(),1e-2);
		assertEquals(4186.01,Pitch.Frequency.C8.frequency(),1e-2);
		
	}

	@Test
	public void testBuild()
	{
		
	}
	
}
